<template>
  <div :hidden="loadAwaitHidden" />
</template>

<script>
export default {
  name: 'Home',

  data () {
    return {
      loadAwaitHidden: false
    }
  },

  watch: {
    $route: {
      handler (t, f) {
        if (!f || /Login|login/.test(f.name)) {
          this.loadAwaitHidden = true
          this.$nextTick(_ => {
            this.loadAwaitHidden = false
          })
        }
        if (t.path === '/') this.$router.replace('/property/plan')
      },
      immediate: true
    }
  }
}
</script>
